CC = gcc
CFLAGS = -fPIC

all: libmath.so

libmath.so: add.o mul.o
	$(CC) -shared add.o mul.o -o libmath.so

add.o: add.c math.h
	$(CC) $(CFLAGS) -c add.c

mul.o: mul.c math.h
	$(CC) $(CFLAGS) -c mul.c

clean:
	rm -f *.o *.so

